<div class="page_head">
<h2>Listing payments</h2>
</div>

<table class=data>
  <tr>
    <th>Company</th>
    <th>Created at</th>
    <th>Amount</th>
    <th>action</th>
  </tr>
  
<% for payment in @payments %>
  <tr>
    <td><%=h payment.company.name%></td>
    <td><%=h payment.created_at.strftime("%Y-%m-%d %H:%M") %></td>
    <td><%=h payment.amount %></td>
    <td align=right><%= link_to 'Edit'.t, edit_payment_path(payment),:class=>'admin' %>
       <%= link_to image_tag("trash.gif",:border=>0), payment_path(payment), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New payment', new_payment_path %>
